<div class="animated fadeInRight ecommerce">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>调拨物品</h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm"
                                v-on:click="_goBack()">返回
                        </button>
                        <button type="button" class="btn btn-primary btn-sm"
                                v-on:click="_openAllocationOrderInModel()">
                            <i class="fa fa-plus"></i>选择物品
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                        <tr>
                            <th class="text-center">商品图片</th>
                            <th class="text-center">编号</th>
                            <th class="text-center">名称</th>
                            <th class="text-center">原仓库</th>
                            <th class="text-center">目标仓库</th>
                            <th class="text-center">规格</th>
                            <th class="text-center">库存</th>
                            <th class="text-center">数量</th>
                            <th class="text-center">单价</th>
                            <th class="text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="productManage in allocationOrderInInfo.productManages">
                            <td class="text-center">
                                <img style="width: 60px; height: 60px; border-radius: 5px;"
                                     v-bind:src="productManage.coverPhoto">
                            </td>
                            <td class="text-center">{{productManage.productId}}</td>
                            <td class="text-center">{{productManage.prodName}}</td>
                            <td class="text-center">{{productManage.shName}}</td>
                            <td class="text-center">
                                <select class="custom-select" v-model="allocationOrderInInfo.targetShId">
                                    <option selected value="">请选择目标仓库</option>
                                    <option v-for="shopHouse in allocationOrderInInfo.shopHouses"
                                            :value="shopHouse.shId">
                                        {{shopHouse.shName}}
                                    </option>
                                </select>
                            </td>
                            <td class="text-center">{{productManage.defaultSpecValue.specName}}</td>
                            <td class="text-center">{{productManage.defaultSpecValue.stock}}</td>
                            <td class="text-center">
                                <input class="form-control" v-model="productManage.count" type="number"
                                       @keyup="_caculTotalMount()"/>
                            </td>
                            <td class="text-center">
                                <input class="form-control" v-model="productManage.price" type="number"
                                       @keyup="_caculTotalMount()"/>
                            </td>
                            <td class="text-center">
                                <div class="btn-group">
                                    <button class="btn-white btn btn-xs"
                                            v-on:click="_deleteProduct(productManage)">删除
                                    </button>
                                </div>
                            </td>
                        </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="9">
                                <ul class="pagination float-right"></ul>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>调拨说明</h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">申请说明</label>
                        <div class="col-sm-10 ">
                            <textarea v-model="allocationOrderInInfo.remark" placeholder="必填，请填写申请说明"
                                      class="form-control"></textarea>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-10"></div>
        <div class="col-md-2 " style="margin-bottom:10px; text-align:right">
            <button type="button" class="btn btn-primary" style="margin-left:10px;"
                    v-on:click="_submitApply()">提交
            </button>
        </div>
    </div>
    <vc:create path="goods/chooseProductAndSpec" emitChooseProduct='allocationOrderIn'
               emitLoadData='allocationOrderIn'>
    </vc:create>
</div>